<template>
  <XMTitle :title="newCategoryType" />
  <XMListCard
    :gameJson="data"
    openBig
    openAd
  />
  <XMTitle title="Game Categories" />
  <XMCategory showMore />
</template>

<script setup lang="ts">
import { useGA } from "~/composables/useGA";

const { categoryType = "" } = useRoute().query;
const { hostName } = useConfigStore();
const { trackEvent } = useGA();
const { data } = await useFetch<ConfigJsonType>("/api/getGameByCatetory", {
  method: "POST",
  body: { hostName, categoryType },
});
const newCategoryType = `${categoryType} Games`;

trackEvent({
  eventName: "CateDetail_Page_Show",
});
</script>

<style scoped></style>
